package com.taikang.dao;

import com.taikang.dao.base.DefaultCommonDaoImpl;
import com.taikang.entity.MessageRecord;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * Created by zhai on 16/5/15.
 */
@Repository
public class MessageDao extends DefaultCommonDaoImpl<MessageRecord> {

    public boolean addMessage(Integer userId, Integer employeeId, String name){

        MessageRecord messageRecord = new MessageRecord();
        messageRecord.setUserID(userId);
        messageRecord.setEmployeeID(employeeId);
        messageRecord.setContents(name);
        messageRecord.setDate(new Date());
        return null!=create(messageRecord);
    }
}
